﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using WebToolService;

namespace WebTool
{
    public class BaseController : Controller
    {
        #region Properties
        public UserService UserService { get; set; }

        public virtual string MainCshtmlName
        {
            get { return ""; }
        }

        public UserModel CurrentUserModel { get; set; }

        #endregion

        #region Constructors
        #endregion

        public virtual void GetCurrentUser()
        {
            this.CurrentUserModel = UserService.GetUserModelByName(Request.Cookies[ConstParameter.WebToolUserName].Get(x => x.Value).ToStringN());
        }
    }
}